package omm.domain;

public class Order extends PersistentAttributes implements Comparable<Order>{

	private static final long serialVersionUID = 1L;
	private Entity entity;
	private String name;

	public Order(int i){super(i);};
	
	public Order(Integer orderID, Entity entity) {
		super(orderID);
		this.entity = entity;
	}
	
	public Order(Integer orderID, String name) {
		super(orderID);
		this.name = name;
	}
	
	public Order(Integer orderID, String name,Entity entity) {
		super(orderID);
		this.entity = entity;
		this.name = name;
	}

	public Entity getEntity() {
		return entity;
	}

	public void setEntity(Entity entity) {
		this.entity = entity;
	}

	public String getName(){
		return name;
	}
	
	
	@Override
	public int compareTo(Order o) {
		Integer id =new Integer(this.getId());
		return id.compareTo(o.getId());
	}
	
	
}
